package bishi.day33_6_1;

import java.util.*;

/**
 * 剪花布条
 *
 * @author 是阿秋啊
 * @date 2022/06/01 12:52
 **/
public class jian_hua_bu_tiao {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String str = sc.next();
            String tmp = sc.next();
            int i = 0;
            int j = tmp.length();
            int len = str.length();
            int count = 0;
            while (i + j <= len) {
                if (str.charAt(i) == tmp.charAt(0)) {
                    if (str.substring(i, i + j).equals(tmp)) {
                        count++;
                        i += j;
                    } else {
                        i++;
                    }
                } else {
                    i++;
                }
            }
            System.out.println(count);
        }
    }
}
